﻿
namespace AbpProjectTemplate.Extensions
{
    public static class ObjectExtensions
    {
        public static void ThrowUserFriendlyExceptionIfNull<T>(this T obj, string errMessage = "对像不能为null")
          where T : class
        {
            if (obj == null)
                throw new AppUserFriendlyException(errMessage);
        }
    }
}
